import React,{ Component } from "react";
import { View,Text } from "react-native";

export default class MyCustomElement extends Component {
    constructor(props){
        super(props);
    }
    _Item(){
        const { icon } = this.props;
        let info = (
            <View style={{backgroundColor:'#d04542',height:25,width:25,borderRadius:50,justifyContent: 'center',alignItems: 'center',}}>
                <Text style={{color:'white'}}>
                    {icon}
                </Text>
            </View>
        );
        if(icon){
            return info;
        }else{
            return (
                <View>

                </View>
            );
        }
    }
    render(){
        return (
            <View>
                { this._Item() }
            </View>
        )
    }
}